<template>
  <div>
      <div style="margin-bottom: 10px;text-align: left;font-weight: bold;font-size:17px;line-height: 1.3;">
        <span v-show="item.optional" style="color:red;font-size: 20px;float:left;">* </span>

        <span v-show="autoId">{{num+1}}.</span><span>{{item.title}}</span>
      </div>
      <div v-if="item.remark.trim()!=''" style="margin-bottom: 20px;text-align: left;font-size:14px;line-height: 1.3;color:grey">
        说明：{{item.remark}}
      </div>
      <div style="padding: 0;margin: 0 0 10px 0;">
        <el-input
            type="textarea"
            :autosize="{ minRows: 1}"
            placeholder=""
            v-model="answer"
            @change="provideanswer">
        </el-input>
      </div>  
  </div>
</template>
<script>
export default {
  name:'SingleChoice',
  components:{
    
  },
  data(){
    return{
      answer:''
    }
  },
  props:{
    item:Object,
    id:Number,
    editIcon:String,
    autoId:Boolean,
    num:Number
  },
  computed:{
    
  },

  methods:{
    provideanswer(){
      console.log('test3')
      let data={
        id:this.item.id,
        answer:this.answer
      };
      this.$emit('sendanswer',data)
    }
  }
}
</script>